<template>
  <div class="page-wrapper">
    <div>
      <p>这个是count:{{count}}</p>
      <button @click="countAll">加</button>
    </div>
    <div>
      <p>这个是num:{{num}}</p>
      <button @click="numAll">加</button>
    </div>
    <ceshi :name="name" @aaName="aaName"></ceshi>
  </div>
</template>

<script>
import utils from '@/utils/utils.js'
import publicMethod from '@/utils/index.js'
import ceshi from "./新特性测试";
import { reactive, ref, toRefs } from "vue";
export default {
  name: "Test",
  components: {
    ceshi,
  },
  setup() {
    const state = reactive({
      count: 0,
      name:'你好'
    });
    const num = ref(0);

    const countAdd = () => {
      state.count++;
    };
    const countAll = () => {
      countAdd();
    };

    const numAdd = () => {
      num.value++;
    };
    const numAll = () => {
      numAdd();
    };

    const aaName=(res)=>{
      console.log(res,333)
    }
    utils.cc()
    publicMethod.bb()
    return {
      ...toRefs(state),
      num,
      countAll,
      numAll,
      aaName,
    };
  },
};
</script>